import pprint

file_name = r'D:\codes\study\lesson\04.异常与文件\demo.txt'

with open(file_name, encoding='utf-8') as file_obj:
    # content = file_obj.readline()
    content = file_obj.readlines()
    pprint.pprint(content)
